using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._SuitabilityAnalysis
{
    /// <summary>
    /// <para>Add Point Layer Based Suitability Criteria</para>
    /// <para>Adds criteria based on spatial relationships between the input layer and a given point layer.</para>
    /// <para>根据输入图层和给定点图层之间的空间关系添加条件。</para>
    /// </summary>    
    [DisplayName("Add Point Layer Based Suitability Criteria")]
    public class AddPointLayerBasedSuitabilityCriteria : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddPointLayerBasedSuitabilityCriteria()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_analysis_layer">
        /// <para>Input Suitability Analysis Layer</para>
        /// <para>The Suitability Analysis layer that will be used in the analysis.</para>
        /// <para>将在分析中使用的适宜性分析图层。</para>
        /// </param>
        /// <param name="_site_layer_id_field">
        /// <para>Site Layer ID Field</para>
        /// <para>A field containing unique values for each record within the Suitability Analysis layer.</para>
        /// <para>包含适宜性分析图层中每条记录的唯一值的字段。</para>
        /// </param>
        /// <param name="_in_point_features">
        /// <para>Point Features</para>
        /// <para>The layer containing point locations to be added as criteria based on spatial relationship to the Suitability Analysis layer.</para>
        /// <para>包含要根据适宜性分析图层的空间关系添加为条件的点位置的图层。</para>
        /// </param>
        /// <param name="_criteria_type">
        /// <para>Criteria Type</para>
        /// <para><xdoc>
        ///   <para>Defines the type of spatial relationship to be used as criteria.</para>
        ///   <bulletList>
        ///     <bullet_item>Count—A count of points that fall within each Suitability Analysis layer polygon. This is the default.</bullet_item><para/>
        ///     <bullet_item>Weight—Calculates field-weighted criteria of points that fall within each Suitability Analysis polygon based on the user-selected statistical type.</bullet_item><para/>
        ///     <bullet_item>Minimal Distance—Adds distance from the closest point to each of the Suitability Analysis layer centroids as criteria.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义要用作条件的空间关系类型。</para>
        ///   <bulletList>
        ///     <bullet_item>计数 - 位于每个适宜性分析图层面内的点计数。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>权重 - 根据用户选择的统计类型计算属于每个适宜性分析面内的点的字段加权条件。</bullet_item><para/>
        ///     <bullet_item>最小距离 - 将从最近点到每个适宜性分析层质心的距离添加为条件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// </param>
        /// <param name="_weight_field">
        /// <para>Weight Field</para>
        /// <para>Numeric fields that exist within a point layer that can be selected for weighting.</para>
        /// <para>存在于点图层中可选择进行加权的数值字段。</para>
        /// </param>
        public AddPointLayerBasedSuitabilityCriteria(object _in_analysis_layer, object _site_layer_id_field, object _in_point_features, _criteria_type_value _criteria_type, object _weight_field)
        {
            this._in_analysis_layer = _in_analysis_layer;
            this._site_layer_id_field = _site_layer_id_field;
            this._in_point_features = _in_point_features;
            this._criteria_type = _criteria_type;
            this._weight_field = _weight_field;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Add Point Layer Based Suitability Criteria";

        public override string CallName => "ba.AddPointLayerBasedSuitabilityCriteria";

        public override List<string> AcceptEnvironments => ["baDataSource", "baNetworkSource", "workspace"];

        public override object[] ParameterInfo => [_in_analysis_layer, _site_layer_id_field, _in_point_features, _criteria_type.GetGPValue(), _distance_type, _units, _in_site_centers_features, _site_centers_id_field, _weight_field, _statistics_type.GetGPValue(), _out_analysis_layer, _out_criteria_name, _cutoff_distance];

        /// <summary>
        /// <para>Input Suitability Analysis Layer</para>
        /// <para>The Suitability Analysis layer that will be used in the analysis.</para>
        /// <para>将在分析中使用的适宜性分析图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Suitability Analysis Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_analysis_layer { get; set; }


        /// <summary>
        /// <para>Site Layer ID Field</para>
        /// <para>A field containing unique values for each record within the Suitability Analysis layer.</para>
        /// <para>包含适宜性分析图层中每条记录的唯一值的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Site Layer ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _site_layer_id_field { get; set; }


        /// <summary>
        /// <para>Point Features</para>
        /// <para>The layer containing point locations to be added as criteria based on spatial relationship to the Suitability Analysis layer.</para>
        /// <para>包含要根据适宜性分析图层的空间关系添加为条件的点位置的图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Point Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_point_features { get; set; }


        /// <summary>
        /// <para>Criteria Type</para>
        /// <para><xdoc>
        ///   <para>Defines the type of spatial relationship to be used as criteria.</para>
        ///   <bulletList>
        ///     <bullet_item>Count—A count of points that fall within each Suitability Analysis layer polygon. This is the default.</bullet_item><para/>
        ///     <bullet_item>Weight—Calculates field-weighted criteria of points that fall within each Suitability Analysis polygon based on the user-selected statistical type.</bullet_item><para/>
        ///     <bullet_item>Minimal Distance—Adds distance from the closest point to each of the Suitability Analysis layer centroids as criteria.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义要用作条件的空间关系类型。</para>
        ///   <bulletList>
        ///     <bullet_item>计数 - 位于每个适宜性分析图层面内的点计数。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>权重 - 根据用户选择的统计类型计算属于每个适宜性分析面内的点的字段加权条件。</bullet_item><para/>
        ///     <bullet_item>最小距离 - 将从最近点到每个适宜性分析层质心的距离添加为条件。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Criteria Type")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _criteria_type_value _criteria_type { get; set; }

        public enum _criteria_type_value
        {
            /// <summary>
            /// <para>Count</para>
            /// <para>Count—A count of points that fall within each Suitability Analysis layer polygon. This is the default.</para>
            /// <para>计数 - 位于每个适宜性分析图层面内的点计数。这是默认设置。</para>
            /// </summary>
            [Description("Count")]
            [GPEnumValue("COUNT")]
            _COUNT,

            /// <summary>
            /// <para>Weight</para>
            /// <para>Weight—Calculates field-weighted criteria of points that fall within each Suitability Analysis polygon based on the user-selected statistical type.</para>
            /// <para>权重 - 根据用户选择的统计类型计算属于每个适宜性分析面内的点的字段加权条件。</para>
            /// </summary>
            [Description("Weight")]
            [GPEnumValue("WEIGHT")]
            _WEIGHT,

            /// <summary>
            /// <para>Minimal Distance</para>
            /// <para>Minimal Distance—Adds distance from the closest point to each of the Suitability Analysis layer centroids as criteria.</para>
            /// <para>最小距离 - 将从最近点到每个适宜性分析层质心的距离添加为条件。</para>
            /// </summary>
            [Description("Minimal Distance")]
            [GPEnumValue("MINIMAL_DISTANCE")]
            _MINIMAL_DISTANCE,

        }

        /// <summary>
        /// <para>Distance Type</para>
        /// <para>Defines how minimal distance is calculated based on method of travel.</para>
        /// <para>定义如何根据行驶方法计算最小距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _distance_type { get; set; } = null;


        /// <summary>
        /// <para>Measure Units</para>
        /// <para>Defines the type of distance measuring units to be used when calculating minimal distance.</para>
        /// <para>定义计算最小距离时要使用的距离测量单位的类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Measure Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _units { get; set; } = null;


        /// <summary>
        /// <para>Site Centers Features</para>
        /// <para>The point layer that will be used as site centers. This point layer will replace default polygon centroids of the Suitability Analysis layer.</para>
        /// <para>将用作站点中心的点图层。此点图层将替换适宜性分析图层的默认面质心。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Site Centers Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_site_centers_features { get; set; } = null;


        /// <summary>
        /// <para>Site Centers Layer ID Field</para>
        /// <para>A field existing within the Site Centers Features parameter that uniquely identifies each record.</para>
        /// <para>存在于站点中心功能参数中的字段，用于唯一标识每条记录。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Site Centers Layer ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _site_centers_id_field { get; set; } = null;


        /// <summary>
        /// <para>Weight Field</para>
        /// <para>Numeric fields that exist within a point layer that can be selected for weighting.</para>
        /// <para>存在于点图层中可选择进行加权的数值字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weight Field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _weight_field { get; set; }


        /// <summary>
        /// <para>Statistics Type</para>
        /// <para><xdoc>
        ///   <para>The type of statistical operation to be applied to the weighted field.</para>
        ///   <bulletList>
        ///     <bullet_item>Sum—Calculates the total of the field values in each point feature.</bullet_item><para/>
        ///     <bullet_item>Average—Determines the average field value in each point feature.</bullet_item><para/>
        ///     <bullet_item>Standard Deviation—Calculates the standard deviation of the field values in each point feature.</bullet_item><para/>
        ///     <bullet_item>Minimum—Determines the smallest field value in each point feature.</bullet_item><para/>
        ///     <bullet_item>Maximum—Determines the largest field value in each point feature.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要应用于加权字段的统计操作类型。</para>
        ///   <bulletList>
        ///     <bullet_item>总和 （Sum） - 计算每个点要素中字段值的总和。</bullet_item><para/>
        ///     <bullet_item>平均值 （Average） - 确定每个点要素中的平均字段值。</bullet_item><para/>
        ///     <bullet_item>标准差 （Standard Deviation） - 计算每个点要素中字段值的标准差。</bullet_item><para/>
        ///     <bullet_item>最小值 （Minimum） - 确定每个点要素中的最小字段值。</bullet_item><para/>
        ///     <bullet_item>最大值 （Maximum） - 确定每个点要素中的最大字段值。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Statistics Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _statistics_type_value? _statistics_type { get; set; } = null;

        public enum _statistics_type_value
        {
            /// <summary>
            /// <para>Sum</para>
            /// <para>Sum—Calculates the total of the field values in each point feature.</para>
            /// <para>总和 （Sum） - 计算每个点要素中字段值的总和。</para>
            /// </summary>
            [Description("Sum")]
            [GPEnumValue("SUM")]
            _SUM,

            /// <summary>
            /// <para>Average</para>
            /// <para>Average—Determines the average field value in each point feature.</para>
            /// <para>平均值 （Average） - 确定每个点要素中的平均字段值。</para>
            /// </summary>
            [Description("Average")]
            [GPEnumValue("AVE")]
            _AVE,

            /// <summary>
            /// <para>Standard Deviation</para>
            /// <para>Standard Deviation—Calculates the standard deviation of the field values in each point feature.</para>
            /// <para>标准差 （Standard Deviation） - 计算每个点要素中字段值的标准差。</para>
            /// </summary>
            [Description("Standard Deviation")]
            [GPEnumValue("STD_DEV")]
            _STD_DEV,

            /// <summary>
            /// <para>Minimum</para>
            /// <para>Minimum—Determines the smallest field value in each point feature.</para>
            /// <para>最小值 （Minimum） - 确定每个点要素中的最小字段值。</para>
            /// </summary>
            [Description("Minimum")]
            [GPEnumValue("MIN")]
            _MIN,

            /// <summary>
            /// <para>Maximum</para>
            /// <para>Maximum—Determines the largest field value in each point feature.</para>
            /// <para>最大值 （Maximum） - 确定每个点要素中的最大字段值。</para>
            /// </summary>
            [Description("Maximum")]
            [GPEnumValue("MAX")]
            _MAX,

        }

        /// <summary>
        /// <para>Output Suitability Analysis Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Suitability Analysis Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_analysis_layer { get; set; }


        /// <summary>
        /// <para>Output Criteria Name</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Criteria Name")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_criteria_name { get; set; }


        /// <summary>
        /// <para>Cutoff</para>
        /// <para>The distance beyond which points will not be considered in the calculation.</para>
        /// <para>计算中不考虑点的距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cutoff")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _cutoff_distance { get; set; } = null;


        public AddPointLayerBasedSuitabilityCriteria SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}